package domotics;

import jess.*;

public class domo{
	public static void main(String[] argv) throws JessException{
		  Livingroom lr = new Livingroom();
		  Bedroom br = new Bedroom();
		  Kitchen kt = new Kitchen();
		  WC wc = new WC();
		  Appliance coffe = new Appliance();
		  Appliance stereo = new Appliance();
		  Alarm alarm = new Alarm();
		  
		  int timeh = 8;
		  
		  
		  
		  Rete motor = new Rete();
		  
		  int tempout = 21;
		  
		  motor.reset();
		  motor.batch("rules.clp");
		  motor.eval("(assert (temp_out (value "+tempout+  ")))");
		  motor.eval("(assert (time (hours "+timeh+  ")))");
		  motor.add(lr);
		  motor.add(br);
		  motor.add(kt);
		  motor.add(wc);
		  motor.add(coffe);
		  motor.add(stereo);
		  motor.add(alarm);	
		  
		  motor.run();
		  
		  motor.eval("(facts)");
   
   
    
	}
}
